<div class="layui-panel-window">
  <div class="layui-bg-gray">萨克的金凤凰卢萨卡</div>
<button type="button" class="layui-btn" id="test3"><i class="layui-icon"></i>上传文件</button></div>
<script>
    var upload = layui.upload;
    upload.render({
        elem: '#test3'
        , url: '../risksource/importFile'
        , accept: 'file' //普通文件
        , exts: 'xlsx|xls' //只允许上传压缩文件
        , done: function (res) {
            console.log(res)
        }
    });
</script>